<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<!DOCTYPE html>
<security:authentication property="principal" var="myAccount" />

<security:authorize access="isAuthenticated()">
<html>
<head>
	<link href="<%=request.getContextPath()%>/resources/bootstrap/css/bootstrap.css" rel="stylesheet">
	<link href="<%=request.getContextPath()%>/resources/bootstrap/css/bootstrap-theme.css" rel="stylesheet">	
	<link href="<%=request.getContextPath()%>/resources/css/screen-theme.css" rel="stylesheet"> 
	<link href='http://fonts.googleapis.com/css?family=Vollkorn:700' rel='stylesheet' type='text/css'>		  
   <link href='http://fonts.googleapis.com/css?family=Satisfy' rel='stylesheet' type='text/css'>
    <title><decorator:title default="SiteMesh Integration"/></title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <decorator:head/>
</head>
<body>
 	 <header>
 		<a href="<%=request.getContextPath()%>/"><img src="<%=request.getContextPath()%>/resources/img/logo.jpg" alt=""/></a>
 		<h1>Pop <span id="upTitle">Up</span> Intranet</h1>	
 		<div style="clear:both; height:0;">&nbsp;</div> 			
 	</header>
	 <div class="container">
	 		<%@  include file="/resources/includes/userMenu.jspf" %> 	
	 		<div id="breadcrumb">
				<c:set var="str" value="<%=request.getRequestURI()%>"/>
				<c:set var="str2" value="${fn:replace(str,'%20', ' ')}" />			
				<c:set var="splittedString" value="${fn:split(str2, '/')}" />
<%-- 				<c:out value="${splittedString[0]}" /><br/> --%>
				<c:forEach var="i" items="${splittedString}" varStatus="loopCount">
					<c:choose>
						<c:when test="${loopCount.count eq 1}"><c:out value="Accueil"></c:out></c:when>
						<c:otherwise><c:out value=" / ${i}" ></c:out></c:otherwise>
					</c:choose>
				</c:forEach>			
	 		</div>
		    <div id="content">
		        <decorator:body/>
		    </div>
		    <div id="Footer">
	 		 <%@  include file="/resources/includes/subhead.jspf" %>
		    </div>
		</div>
    
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://code.jquery.com/jquery.js"></script>
        <script src="<%=request.getContextPath()%>/resources/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
</security:authorize>	